home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
src
/
apps
/
xconf
/
ConfRouter.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
912b
|
57 lines
//
// Class: ConfRouter
// Base Classes: none
// Author: Jesse Rendleman (jesse@sgi.com)
//
// unix includes
#include <errno.h>
#include <stdio.h>
#include <signal.h>
#include <sys/param.h>
#include <netinet/in.h>
// X11/motif includes
#include <Xm/Xm.h>
// conf includes
#include "ConfMsg.h"
#include "ConfText.h"
#define XCONF_MCAST_GROUP "225.0.0.250"
#define MAX_MCAST_HOPS 31
#define DEFPORT 6090
class ConfRouter {
private:
protected:
int _port;
int _tcpSocket;
int _udpSocket;
struct sockaddr_in _tcpSendAddr;
struct sockaddr_in _tcpRecvAddr;
struct sockaddr_in _udpSendAddr;
struct sockaddr_in _udpRecvAddr;
int _addrSize;
Boolean setupTCP();
Boolean setupUDP();
Boolean handleTCP();
Boolean handleUDP();
public:
ConfRouter();
~ConfRouter();
void Init(int port);
void Run();
void Quit();
};